<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport"
		content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
	<title>疫情分析系统</title>
	<link rel="stylesheet" href="./res/layui/css/layui.css">
	<link rel="stylesheet" href="./res/static/css/index.css">
	<link rel="icon" href="./images/favicon.ico">
	<script src="./api/config.js"></script>
	<script src="./highCharts/jquery-3.2.1.js"></script>
</head>
<style>
	.nav .layui-nav .layui-nav-item {
		display: inline-block;
		margin: 0 49px;
		line-height: 80px;
	}
</style>

<body style="background-image: url('../res/static/img/bg.jpg')">

	<!-- nav部分 -->
	<div class="nav index">
		<div class="nav-logo">
			<a href="./status.html">
				<img src="./res/static/img/logo.png" width="65" style="margin-left: 20px;">
			</a>
		</div>

		<div class="layui-container">
			<div class="nav-list">
				<button>
					<span></span><span></span><span></span>
				</button>
				<ul class="layui-nav" lay-filter="" style="margin: 0 -15px;">
					<li class="layui-nav-item"><a href="status.html">疫情现状</a></li>
					<li class="layui-nav-item"><a href="nat.html">核酸检测</a></li>
					<li class="layui-nav-item"><a href="news.html">疫情新闻</a></li>
					<li class="layui-nav-item"><a href="virus.html">专题展示</a></li>
					<li class="layui-nav-item layui-this"><a href="way.html">出行速查</a></li>
					<li class="layui-nav-item"><a href="resident.html">居民上报</a></li>
					<li class="layui-nav-item"><a href="hospital.html">医院速查</a></li>
				</ul>
			</div>
		</div>
	</div>

	<!-- main -->
	<div class="main-news">
		<div class="layui-container">
			<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
				<legend>出行疫情速查</legend>
			</fieldset>
			<form class="layui-form layui-form-pane">
				<div class="layui-form-item">

					<div class="layui-inline">
						<label class="layui-form-label">出发时间</label>
						<div class="layui-input-inline">
							<input type="date" name="way_starttime" class="layui-input" lay-verify="" id="test5"
								placeholder="年-月-日">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">出行方式</label>
						<div class="layui-input-inline">
							<input type="text" name="way_travelway" class="layui-input" lay-verify="">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">车次信息</label>
						<div class="layui-input-inline">
							<input type="text" name="way_tranis" id="way_tranis" lay-verify="" autocomplete="off"
								class="layui-input" placeholder="例如：K8678">
						</div>
					</div>



					<div class="layui-inline">
						<button type="submit" class="layui-btn " lay-submit lay-filter="data-search-btn"><i
								class="layui-icon"></i> 查 询</button>
					</div>
				</div>
			</form>

			<div class="layui-container">

				<div style="height: 350px;">
					<table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>

				</div>
			</div>

		</div>
	</div>




	<script src="./lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
	<script src="./res/layui/layui.js"></script>
	<script>
		layui.use(['form', 'table'], function () {
			var $ = layui.jquery,
				form = layui.form,
				table = layui.table;

			table.render({
				elem: '#currentTableId',
				url: 'http://localhost:8080/admin/travel/way/list',
				defaultToolbar: ['filter', 'exports', 'print', {
					title: '提示',
					layEvent: 'LAYTABLE_TIPS',
					icon: 'layui-icon-tips'
				}],
				cols: [[
					// { field: 'way_tid', title: '行程id',align: "center"},
					{ field: 'way_travelway', title: '出行方式',align: "center" },
					{ field: 'way_tranis', title: '车次信息',align: "center" },
					{ field: 'way_starttime', title: '出发时间',align: "center" },
					{ field: 'way_endtime', title: '到达时间',align: "center" }
				]],
				// limits: [5, 15, 20, 25],
				// limit: 5,
				// page: true,
				// skin: 'line'
			});


			// 监听搜索操作
			form.on('submit(data-search-btn)', function (data) {
				var result = JSON.stringify(data.field);

				//执行搜索重载
				table.reload('currentTableId', {
					// page: {
					// 	curr: 1
					// }
					where: {
						way_tid: data.field.way_tid,
						way_travelway: data.field.way_travelway,
						way_tranis: data.field.way_tranis,
						way_starttime: data.field.way_starttime,
						way_endtime: data.field.way_endtime
					}
				}, 'data');

				return false;
			});



			layui.config({
				base: './res/static/js/'
			}).use('firm');

			layui.config({
				base: './mods/', version: '1.0'
			});

			layui.use(['form', 'layer', 'layarea', 'laydate'], function () {
				var $ = layui.jquery,
					form = layui.form,
					layarea = layui.layarea,
					laydate = layui.laydate;
			});
		});
	</script>
</body>

</html>